<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

class ViewController extends Controller
{
    //
    public function index(){
        $name = 'my blog';
        $arr = ['a','b','c',4,5];
        $data = [
            'name'=>$name,
            'arr' => $arr,
            'script'=>'<script>alert(1);</script>',
            'score'=>5,
        ];
        return view('my')->with($data);
    }

    public function view(){
        var_dump(config('database.connections')) ;
//        return view('index');
    }

    public function article(){
        return view('article');
    }

    public function layout(){
        return view('layout');
    }
}
